'''
Created on 21/11/2011

@author: Marina
'''

class MemoryManager:
    
    def __init__(self,strategy, memory, disc):
        self.memory = memory 
        self.strategy = strategy
        self.disc=disc
        
    def setKernel(self, kernel):
        self.strategy.kernel=kernel
        
    
    def load(self, program, pid):
        self.strategy.load(self,program, pid)
            
            
    def read(self, pid, pc):
        return self.strategy.read(self, pid, pc)
        
    def unload(self, pid):
        self.strategy.unload(self, pid)
    

    def contextSwitch(self, pcbToMemory, pcbToDisk):
        
        self.strategy.contextSwitch(self, pcbToMemory, pcbToDisk)
        
        
    def processInMemory(self, pid):
        return self.strategy.processInRAM(pid)
        
        